package gui;

import data.Film;
import data.Komentar;
import java.awt.CardLayout;
import java.awt.event.KeyEvent;
import java.util.Arrays;
import java.util.List;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.ListSelectionModel;

/**
 *
 * @author Michal Hanzlik, Tomas Jiran
 */
public class Window extends javax.swing.JFrame {

    /**
     * Creates new form Window
     */
    public Window() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        cards = new javax.swing.JPanel();
        login_panel = new javax.swing.JPanel();
        login_login_button = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        login_login_value = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        login_newUser_button = new javax.swing.JButton();
        login_notes_label = new javax.swing.JLabel();
        login_password_value = new javax.swing.JPasswordField();
        registration_panel = new javax.swing.JPanel();
        registration_registration_button = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        registration_newlogin_value = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        registration_notes_label = new javax.swing.JLabel();
        registration_newPassword_value = new javax.swing.JPasswordField();
        jLabel7 = new javax.swing.JLabel();
        registration_newPassword2_value = new javax.swing.JPasswordField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        registration_newName_value = new javax.swing.JTextField();
        registration_newSurname_value = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        registration_newEmail_value = new javax.swing.JTextField();
        profil_panel = new javax.swing.JPanel();
        profil_login_label = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        profil_comboBox_filmy = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        profil_name_value = new javax.swing.JTextField();
        profil_surname_value = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        profil_email_value = new javax.swing.JTextField();
        profil_newPassword_value = new javax.swing.JPasswordField();
        profil_newPassword_value2 = new javax.swing.JPasswordField();
        jLabel11 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        profil_notes_pass = new javax.swing.JLabel();
        profil_editSave_button = new javax.swing.JButton();
        newFilm_panel = new javax.swing.JPanel();
        label_newFilm = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        newFilm_nazevOrig = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        newFilm_rok = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        newFilm_delka = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        newFilm_zanr_list = new javax.swing.JList();
        jScrollPane3 = new javax.swing.JScrollPane();
        newFilm_stat_list = new javax.swing.JList();
        jLabel26 = new javax.swing.JLabel();
        newFilm_nazev = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        newFilm_reziseri_list = new javax.swing.JList();
        jScrollPane5 = new javax.swing.JScrollPane();
        newFilm_herci_list = new javax.swing.JList();
        addFilm_button = new javax.swing.JButton();
        newFilm_label = new javax.swing.JLabel();
        film_panel = new javax.swing.JPanel();
        film_name_label = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        film_origNazev_value = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        film_rok_value = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        film_delka_value = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        film_hodnoceni_value = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        film_stat_value = new javax.swing.JTextField();
        film_zanr_value = new javax.swing.JTextField();
        jScrollPane9 = new javax.swing.JScrollPane();
        film_komentar_value = new javax.swing.JTextArea();
        addComment_button = new javax.swing.JButton();
        film_ohodnoceni_comboBox = new javax.swing.JComboBox();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        deleteComment_button = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        film_listOfComments = new javax.swing.JList();
        search_panel = new javax.swing.JPanel();
        searchFilm_panel = new javax.swing.JPanel();
        label_newFilm1 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        searchFilm_nazevFilmu_value = new javax.swing.JTextField();
        searchFilm_search_button = new javax.swing.JButton();
        searchFilm_notes_label = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        filmy_list = new javax.swing.JComboBox();
        newZanr_panel = new javax.swing.JPanel();
        label_newZanr = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        newZanr_nazev = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        addZanr_button = new javax.swing.JButton();
        newZanr_label = new javax.swing.JLabel();
        jScrollPane8 = new javax.swing.JScrollPane();
        newZanr_charakteristika = new javax.swing.JTextArea();
        newStat_panel = new javax.swing.JPanel();
        label_newStat = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        newStat_nazev = new javax.swing.JTextField();
        addStat_button = new javax.swing.JButton();
        newStat_label = new javax.swing.JLabel();
        newHerec_panel = new javax.swing.JPanel();
        label_newHerec = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        newHerec_jmeno = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        newHerec_prijmeni = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        newHerec_datum = new javax.swing.JTextField();
        addHerec_button = new javax.swing.JButton();
        newHerec_label = new javax.swing.JLabel();
        newReziser_panel = new javax.swing.JPanel();
        label_newReziser = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        newReziser_jmeno = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        newReziser_prijmeni = new javax.swing.JTextField();
        addReziser_button = new javax.swing.JButton();
        newReziser_label = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        newReziser_popis = new javax.swing.JTextArea();
        jMenuBar1 = new javax.swing.JMenuBar();
        file = new javax.swing.JMenu();
        profil = new javax.swing.JMenuItem();
        konec = new javax.swing.JMenuItem();
        film = new javax.swing.JMenu();
        create_film = new javax.swing.JMenuItem();
        search_film = new javax.swing.JMenuItem();
        zanr = new javax.swing.JMenu();
        create_zanr = new javax.swing.JMenuItem();
        stat = new javax.swing.JMenu();
        create_stat = new javax.swing.JMenuItem();
        herec = new javax.swing.JMenu();
        create_herec = new javax.swing.JMenuItem();
        reziser = new javax.swing.JMenu();
        create_reziser = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        cards.setLayout(new java.awt.CardLayout());

        login_login_button.setText("Přihlásit");
        login_login_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                login_login_buttonActionPerformed(evt);
            }
        });

        jLabel1.setText("Login:");

        jLabel2.setText("Heslo");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel3.setText("Přihlášení");

        login_newUser_button.setText("Nový účet");
        login_newUser_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                login_newUser_buttonActionPerformed(evt);
            }
        });

        login_notes_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        login_password_value.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                login_password_valueKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout login_panelLayout = new javax.swing.GroupLayout(login_panel);
        login_panel.setLayout(login_panelLayout);
        login_panelLayout.setHorizontalGroup(
            login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(login_panelLayout.createSequentialGroup()
                .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(login_panelLayout.createSequentialGroup()
                        .addGap(136, 136, 136)
                        .addComponent(jLabel3))
                    .addGroup(login_panelLayout.createSequentialGroup()
                        .addGap(84, 84, 84)
                        .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(login_panelLayout.createSequentialGroup()
                                    .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, login_panelLayout.createSequentialGroup()
                                            .addComponent(jLabel1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                        .addGroup(login_panelLayout.createSequentialGroup()
                                            .addComponent(jLabel2)
                                            .addGap(7, 7, 7)))
                                    .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(login_password_value)
                                        .addComponent(login_login_value, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(login_newUser_button, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(login_login_button, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(login_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(552, Short.MAX_VALUE))
        );
        login_panelLayout.setVerticalGroup(
            login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(login_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(login_login_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(32, 32, 32)
                .addGroup(login_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(login_password_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(login_login_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(login_newUser_button)
                .addGap(124, 124, 124)
                .addComponent(login_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(344, Short.MAX_VALUE))
        );

        cards.add(login_panel, "login_panel");

        registration_registration_button.setText("Registrovat");
        registration_registration_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                registration_registration_buttonActionPerformed(evt);
            }
        });

        jLabel4.setText("Login:");

        jLabel5.setText("Heslo");

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel6.setText("Registrace");

        registration_notes_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jLabel7.setText("Heslo znovu:");

        jLabel8.setText("Jméno");

        jLabel9.setText("Příjmení");

        jLabel10.setText("E-mail:");

        javax.swing.GroupLayout registration_panelLayout = new javax.swing.GroupLayout(registration_panel);
        registration_panel.setLayout(registration_panelLayout);
        registration_panelLayout.setHorizontalGroup(
            registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(registration_panelLayout.createSequentialGroup()
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(registration_panelLayout.createSequentialGroup()
                        .addGap(136, 136, 136)
                        .addComponent(jLabel6))
                    .addGroup(registration_panelLayout.createSequentialGroup()
                        .addGap(80, 80, 80)
                        .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(registration_panelLayout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(38, 38, 38)
                                .addComponent(registration_newName_value, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(registration_panelLayout.createSequentialGroup()
                                .addGap(3, 3, 3)
                                .addComponent(registration_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel4))
                                .addGroup(registration_panelLayout.createSequentialGroup()
                                    .addComponent(jLabel9)
                                    .addGap(32, 32, 32)
                                    .addComponent(registration_newSurname_value))
                                .addGroup(registration_panelLayout.createSequentialGroup()
                                    .addGap(3, 3, 3)
                                    .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel7)
                                        .addComponent(jLabel10))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(registration_registration_button, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(registration_newPassword2_value)
                                            .addComponent(registration_newPassword_value)
                                            .addComponent(registration_newlogin_value)
                                            .addComponent(registration_newEmail_value, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))))))))
                .addContainerGap(553, Short.MAX_VALUE))
        );
        registration_panelLayout.setVerticalGroup(
            registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(registration_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel6)
                .addGap(2, 2, 2)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(registration_newName_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(registration_newSurname_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(registration_newlogin_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(registration_newPassword_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(registration_newPassword2_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(registration_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(registration_newEmail_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addComponent(registration_registration_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 412, Short.MAX_VALUE)
                .addComponent(registration_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(19, 19, 19))
        );

        cards.add(registration_panel, "registration_panel");
        registration_panel.getAccessibleContext().setAccessibleName("");

        profil_panel.setName(""); // NOI18N
        profil_panel.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                profil_panelComponentShown(evt);
            }
        });

        profil_login_label.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N

        jLabel12.setText("Jméno:");

        jLabel13.setText("Příjmení:");

        profil_comboBox_filmy.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                profil_comboBox_filmyComponentShown(evt);
            }
        });
        profil_comboBox_filmy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                profil_comboBox_filmyActionPerformed(evt);
            }
        });

        jLabel14.setText("Vložené filmy:");

        jLabel16.setText("E-mail:");

        jLabel11.setText("Nové heslo:");

        jLabel17.setText("Nové heslo znovu:");

        profil_editSave_button.setText("Upravit");
        profil_editSave_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                profil_editSave_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout profil_panelLayout = new javax.swing.GroupLayout(profil_panel);
        profil_panel.setLayout(profil_panelLayout);
        profil_panelLayout.setHorizontalGroup(
            profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(profil_panelLayout.createSequentialGroup()
                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(profil_panelLayout.createSequentialGroup()
                        .addGap(48, 48, 48)
                        .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addGroup(profil_panelLayout.createSequentialGroup()
                                .addComponent(jLabel11)
                                .addGap(42, 42, 42)
                                .addComponent(profil_newPassword_value, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(profil_comboBox_filmy, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, profil_panelLayout.createSequentialGroup()
                                    .addComponent(jLabel16)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(profil_email_value))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, profil_panelLayout.createSequentialGroup()
                                    .addComponent(jLabel12)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(profil_name_value, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel13)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(profil_surname_value, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(profil_panelLayout.createSequentialGroup()
                                .addComponent(jLabel17)
                                .addGap(10, 10, 10)
                                .addComponent(profil_newPassword_value2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(13, 13, 13)
                                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(profil_editSave_button)
                                    .addComponent(profil_notes_pass, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(profil_panelLayout.createSequentialGroup()
                        .addGap(144, 144, 144)
                        .addComponent(profil_login_label, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(558, Short.MAX_VALUE))
        );
        profil_panelLayout.setVerticalGroup(
            profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(profil_panelLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addComponent(profil_login_label, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(profil_name_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(profil_surname_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(profil_email_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(profil_newPassword_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(profil_notes_pass, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(profil_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel17)
                        .addComponent(profil_newPassword_value2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(profil_editSave_button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 198, Short.MAX_VALUE)
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(profil_comboBox_filmy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(259, 259, 259))
        );

        cards.add(profil_panel, "profil_panel");

        newFilm_panel.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                newFilm_panelComponentShown(evt);
            }
        });

        label_newFilm.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newFilm.setText("Nový film");

        jLabel21.setText("Originální název filmu:");

        jLabel24.setText("Rok natočení:");

        jLabel25.setText("Délka filmu (min):");

        jLabel27.setText("Země výroby:");

        jLabel28.setText("Žánr:");

        jScrollPane2.setViewportView(newFilm_zanr_list);

        jScrollPane3.setViewportView(newFilm_stat_list);

        jLabel26.setText("Název filmu:");

        jLabel29.setText("Režisér:");

        jLabel30.setText("Herci:");

        jScrollPane4.setViewportView(newFilm_reziseri_list);

        jScrollPane5.setViewportView(newFilm_herci_list);

        addFilm_button.setText("Přidat");
        addFilm_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newFilm_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout newFilm_panelLayout = new javax.swing.GroupLayout(newFilm_panel);
        newFilm_panel.setLayout(newFilm_panelLayout);
        newFilm_panelLayout.setHorizontalGroup(
            newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newFilm_panelLayout.createSequentialGroup()
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(newFilm_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                        .addGap(150, 150, 150)
                        .addComponent(label_newFilm, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel24, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(jLabel29))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(newFilm_nazevOrig, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                                .addComponent(newFilm_rok)
                                .addComponent(newFilm_delka))
                            .addGroup(newFilm_panelLayout.createSequentialGroup()
                                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                                        .addComponent(jLabel30)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                                        .addComponent(jLabel28)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(96, 96, 96)
                                .addComponent(addFilm_button))))
                    .addGroup(newFilm_panelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(newFilm_label, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(335, Short.MAX_VALUE))
        );
        newFilm_panelLayout.setVerticalGroup(
            newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newFilm_panelLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(label_newFilm, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(newFilm_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel21)
                    .addComponent(newFilm_nazevOrig, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newFilm_rok, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel25)
                    .addComponent(newFilm_delka, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel29)
                    .addGroup(newFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(newFilm_panelLayout.createSequentialGroup()
                            .addComponent(jLabel30)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(addFilm_button))
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 229, Short.MAX_VALUE)
                .addComponent(newFilm_label)
                .addContainerGap())
        );

        cards.add(newFilm_panel, "newFilm_panel");

        film_panel.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                film_panelComponentShown(evt);
            }
        });

        film_name_label.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N

        jLabel15.setText("Originální název filmu:");

        jLabel18.setText("Rok natočení:");

        jLabel19.setText("Délka filmu (min):");

        jLabel20.setFont(new java.awt.Font("Tahoma", 2, 18)); // NOI18N
        jLabel20.setText("Hodnocení:");

        film_hodnoceni_value.setBackground(new java.awt.Color(255, 255, 255));
        film_hodnoceni_value.setFont(new java.awt.Font("Arial Black", 0, 36)); // NOI18N
        film_hodnoceni_value.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        film_hodnoceni_value.setText("100");
        film_hodnoceni_value.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jLabel22.setText("Země výroby:");

        jLabel23.setText("Žánr:");

        film_komentar_value.setColumns(20);
        film_komentar_value.setRows(5);
        jScrollPane9.setViewportView(film_komentar_value);

        addComment_button.setText("Přidat komentář");
        addComment_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addComment_buttonActionPerformed(evt);
            }
        });

        film_ohodnoceni_comboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "10", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0" }));
        film_ohodnoceni_comboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                film_ohodnoceni_comboBoxActionPerformed(evt);
            }
        });

        jLabel39.setText("Ohodnotit:");

        deleteComment_button.setText("Smazat Komentář");
        deleteComment_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deleteComment_buttonActionPerformed(evt);
            }
        });

        jScrollPane6.setViewportView(film_listOfComments);

        javax.swing.GroupLayout film_panelLayout = new javax.swing.GroupLayout(film_panel);
        film_panel.setLayout(film_panelLayout);
        film_panelLayout.setHorizontalGroup(
            film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(film_panelLayout.createSequentialGroup()
                .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(film_panelLayout.createSequentialGroup()
                            .addGap(44, 44, 44)
                            .addComponent(film_name_label, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, film_panelLayout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(film_origNazev_value, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(film_rok_value, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(film_delka_value, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(film_stat_value, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(film_zanr_value, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(38, 38, 38)
                            .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(film_hodnoceni_value, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, film_panelLayout.createSequentialGroup()
                                    .addComponent(jLabel39)
                                    .addGap(31, 31, 31)
                                    .addComponent(film_ohodnoceni_comboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(film_panelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(film_panelLayout.createSequentialGroup()
                                .addComponent(deleteComment_button)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(addComment_button))
                            .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, film_panelLayout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jScrollPane6))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, film_panelLayout.createSequentialGroup()
                            .addGap(235, 235, 235)
                            .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(409, Short.MAX_VALUE))
        );
        film_panelLayout.setVerticalGroup(
            film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(film_panelLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(film_name_label, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(film_panelLayout.createSequentialGroup()
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel15)
                            .addComponent(film_origNazev_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(film_rok_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addComponent(film_delka_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel22)
                            .addComponent(film_stat_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(film_panelLayout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(film_hodnoceni_value, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel23)
                    .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(film_ohodnoceni_comboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(film_zanr_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel39))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
                .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(film_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(addComment_button)
                    .addComponent(deleteComment_button))
                .addGap(46, 46, 46))
        );

        cards.add(film_panel, "film_panel");

        javax.swing.GroupLayout search_panelLayout = new javax.swing.GroupLayout(search_panel);
        search_panel.setLayout(search_panelLayout);
        search_panelLayout.setHorizontalGroup(
            search_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 868, Short.MAX_VALUE)
        );
        search_panelLayout.setVerticalGroup(
            search_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 683, Short.MAX_VALUE)
        );

        cards.add(search_panel, "search_panel");

        searchFilm_panel.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                searchFilm_panelComponentShown(evt);
            }
        });

        label_newFilm1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newFilm1.setText("Vyhledat film");

        jLabel31.setText("Název filmu:");

        searchFilm_nazevFilmu_value.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                searchFilm_nazevFilmu_valueKeyPressed(evt);
            }
        });

        searchFilm_search_button.setText("Vyhledat");
        searchFilm_search_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchFilm_search_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        filmy_list.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                filmy_listActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout searchFilm_panelLayout = new javax.swing.GroupLayout(searchFilm_panel);
        searchFilm_panel.setLayout(searchFilm_panelLayout);
        searchFilm_panelLayout.setHorizontalGroup(
            searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(searchFilm_panelLayout.createSequentialGroup()
                .addGroup(searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(searchFilm_panelLayout.createSequentialGroup()
                        .addGap(222, 222, 222)
                        .addComponent(label_newFilm1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(searchFilm_panelLayout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addComponent(searchFilm_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(searchFilm_panelLayout.createSequentialGroup()
                        .addGap(62, 62, 62)
                        .addGroup(searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(searchFilm_panelLayout.createSequentialGroup()
                                .addComponent(jLabel31)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(searchFilm_nazevFilmu_value, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(searchFilm_search_button))
                            .addComponent(filmy_list, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(349, 349, 349)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        searchFilm_panelLayout.setVerticalGroup(
            searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(searchFilm_panelLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addComponent(label_newFilm1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addGroup(searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(searchFilm_panelLayout.createSequentialGroup()
                        .addGroup(searchFilm_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel31)
                            .addComponent(searchFilm_nazevFilmu_value, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(searchFilm_search_button))
                        .addGap(38, 38, 38)
                        .addComponent(filmy_list, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(438, 438, 438)
                .addComponent(searchFilm_notes_label, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        cards.add(searchFilm_panel, "searchFilm_panel");

        label_newZanr.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newZanr.setText("Nový žánr");

        jLabel32.setText("Název žánru:");

        jLabel36.setText("Charakteristika:");

        addZanr_button.setText("Přidat");
        addZanr_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newZanr_buttonActionPerformed(evt);
            }
        });

        newZanr_charakteristika.setColumns(20);
        newZanr_charakteristika.setRows(5);
        jScrollPane8.setViewportView(newZanr_charakteristika);

        javax.swing.GroupLayout newZanr_panelLayout = new javax.swing.GroupLayout(newZanr_panel);
        newZanr_panel.setLayout(newZanr_panelLayout);
        newZanr_panelLayout.setHorizontalGroup(
            newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newZanr_panelLayout.createSequentialGroup()
                .addGap(159, 159, 159)
                .addComponent(newZanr_label, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(newZanr_panelLayout.createSequentialGroup()
                .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(newZanr_panelLayout.createSequentialGroup()
                        .addGap(168, 168, 168)
                        .addComponent(label_newZanr, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newZanr_panelLayout.createSequentialGroup()
                        .addGap(49, 49, 49)
                        .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(addZanr_button)
                            .addGroup(newZanr_panelLayout.createSequentialGroup()
                                .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(newZanr_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(454, Short.MAX_VALUE))
        );
        newZanr_panelLayout.setVerticalGroup(
            newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newZanr_panelLayout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(label_newZanr, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38)
                .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(newZanr_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(newZanr_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(newZanr_panelLayout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(135, 135, 135)
                        .addComponent(newZanr_label, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newZanr_panelLayout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(addZanr_button)
                .addContainerGap(328, Short.MAX_VALUE))
        );

        cards.add(newZanr_panel, "newZanr_panel");

        label_newStat.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newStat.setText("Nový stát");

        jLabel33.setText("Název státu:");

        addStat_button.setText("Přidat");
        addStat_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newStat_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout newStat_panelLayout = new javax.swing.GroupLayout(newStat_panel);
        newStat_panel.setLayout(newStat_panelLayout);
        newStat_panelLayout.setHorizontalGroup(
            newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newStat_panelLayout.createSequentialGroup()
                .addGroup(newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(newStat_panelLayout.createSequentialGroup()
                        .addGap(168, 168, 168)
                        .addComponent(label_newStat, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newStat_panelLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addGroup(newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(newStat_panelLayout.createSequentialGroup()
                                .addComponent(newStat_label, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(39, 39, 39)
                                .addComponent(addStat_button))
                            .addGroup(newStat_panelLayout.createSequentialGroup()
                                .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(newStat_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(531, Short.MAX_VALUE))
        );
        newStat_panelLayout.setVerticalGroup(
            newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newStat_panelLayout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(label_newStat, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25)
                .addGroup(newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(newStat_nazev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addGroup(newStat_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(addStat_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(newStat_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(521, Short.MAX_VALUE))
        );

        cards.add(newStat_panel, "newStat_panel");

        label_newHerec.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newHerec.setText("Nový Herec");

        jLabel34.setText("Jméno:");

        jLabel37.setText("Příjmení:");

        jLabel38.setText("Datum narození (dd-mm-yyyy):");

        addHerec_button.setText("Přidat");
        addHerec_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newHerec_buttonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout newHerec_panelLayout = new javax.swing.GroupLayout(newHerec_panel);
        newHerec_panel.setLayout(newHerec_panelLayout);
        newHerec_panelLayout.setHorizontalGroup(
            newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newHerec_panelLayout.createSequentialGroup()
                .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(newHerec_panelLayout.createSequentialGroup()
                            .addGap(168, 168, 168)
                            .addComponent(label_newHerec, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(newHerec_panelLayout.createSequentialGroup()
                            .addGap(51, 51, 51)
                            .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(newHerec_jmeno, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(newHerec_panelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(newHerec_label, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(newHerec_panelLayout.createSequentialGroup()
                                    .addGap(109, 109, 109)
                                    .addComponent(newHerec_datum, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(newHerec_panelLayout.createSequentialGroup()
                                    .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(newHerec_prijmeni, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jLabel38, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(addHerec_button))))
                .addContainerGap(526, Short.MAX_VALUE))
        );
        newHerec_panelLayout.setVerticalGroup(
            newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newHerec_panelLayout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(label_newHerec, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(42, 42, 42)
                .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(newHerec_jmeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(newHerec_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newHerec_prijmeni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37))
                .addGap(27, 27, 27)
                .addComponent(jLabel38)
                .addGap(5, 5, 5)
                .addComponent(newHerec_datum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addComponent(addHerec_button)
                .addGap(39, 39, 39)
                .addComponent(newHerec_label, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(332, Short.MAX_VALUE))
        );

        cards.add(newHerec_panel, "newHerec_panel");

        label_newReziser.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        label_newReziser.setText("Nový režisér");

        jLabel35.setText("Jméno:");

        jLabel42.setText("Příjmení:");

        jLabel43.setText("Popis:");

        addReziser_button.setText("Přidat");
        addReziser_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newReziser_buttonActionPerformed(evt);
            }
        });

        newReziser_popis.setColumns(20);
        newReziser_popis.setRows(5);
        jScrollPane7.setViewportView(newReziser_popis);

        javax.swing.GroupLayout newReziser_panelLayout = new javax.swing.GroupLayout(newReziser_panel);
        newReziser_panel.setLayout(newReziser_panelLayout);
        newReziser_panelLayout.setHorizontalGroup(
            newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newReziser_panelLayout.createSequentialGroup()
                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(newReziser_panelLayout.createSequentialGroup()
                        .addGap(168, 168, 168)
                        .addComponent(label_newReziser, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(newReziser_panelLayout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(newReziser_panelLayout.createSequentialGroup()
                                .addComponent(newReziser_label, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(84, 84, 84)
                                .addComponent(addReziser_button))
                            .addGroup(newReziser_panelLayout.createSequentialGroup()
                                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel42)
                                    .addComponent(jLabel43))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(newReziser_jmeno, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                                    .addComponent(newReziser_prijmeni, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                                    .addComponent(jScrollPane7))))))
                .addContainerGap(461, Short.MAX_VALUE))
        );
        newReziser_panelLayout.setVerticalGroup(
            newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(newReziser_panelLayout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(label_newReziser, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37)
                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(newReziser_jmeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel42)
                    .addComponent(newReziser_prijmeni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel43)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addGroup(newReziser_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(addReziser_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(newReziser_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(295, Short.MAX_VALUE))
        );

        cards.add(newReziser_panel, "newReziser_panel");

        getContentPane().add(cards, java.awt.BorderLayout.CENTER);

        file.setText("Účet");

        profil.setText("Můj profil");
        profil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                profilActionPerformed(evt);
            }
        });
        file.add(profil);

        konec.setText("Ukončit");
        konec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                konecActionPerformed(evt);
            }
        });
        file.add(konec);

        jMenuBar1.add(file);

        film.setText("Film");
        film.setEnabled(false);

        create_film.setText("Vytvořit");
        create_film.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                create_filmActionPerformed(evt);
            }
        });
        film.add(create_film);

        search_film.setText("Najít");
        search_film.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                search_filmActionPerformed(evt);
            }
        });
        film.add(search_film);

        jMenuBar1.add(film);

        zanr.setText("Žánr");
        zanr.setEnabled(false);

        create_zanr.setText("Vytvořit");
        create_zanr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                create_zanrActionPerformed(evt);
            }
        });
        zanr.add(create_zanr);

        jMenuBar1.add(zanr);

        stat.setText("Stát");
        stat.setEnabled(false);

        create_stat.setText("Vytvořit");
        create_stat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                create_statActionPerformed(evt);
            }
        });
        stat.add(create_stat);

        jMenuBar1.add(stat);

        herec.setText("Herec");
        herec.setEnabled(false);

        create_herec.setText("Vytvořit");
        create_herec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                create_herecActionPerformed(evt);
            }
        });
        herec.add(create_herec);

        jMenuBar1.add(herec);

        reziser.setText("Režisér");
        reziser.setEnabled(false);

        create_reziser.setText("Vytvořit");
        create_reziser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                create_reziserActionPerformed(evt);
            }
        });
        reziser.add(create_reziser);

        jMenuBar1.add(reziser);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void login_login_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_login_login_buttonActionPerformed
        String login = login_login_value.getText();
        char[] password_field = login_password_value.getPassword();
        String password = "";
        for (int i = 0; i < password_field.length; i++) {
            password += password_field[i];
        }

        if (!csfd.CSFD.chceckLogin(login, password)) {
            login_notes_label.setText("Nesprávný login nebo heslo.");
        } else {
            login_notes_label.setText("Jste přihlášen.");
            // jestliže jsem přihlášen, zpřístupni všechny položky menu
            for (int i = 0; i < jMenuBar1.getMenuCount(); i++) {
                jMenuBar1.getMenu(i).setEnabled(true);
            }
            switchToPanel("profil_panel");
        }
    }//GEN-LAST:event_login_login_buttonActionPerformed

    private void login_newUser_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_login_newUser_buttonActionPerformed
        switchToPanel("registration_panel");
    }//GEN-LAST:event_login_newUser_buttonActionPerformed

    private void registration_registration_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_registration_registration_buttonActionPerformed
        String newName = registration_newName_value.getText();
        String newSurname = registration_newSurname_value.getText();
        String newLogin = registration_newName_value.getText();

        char[] password = registration_newPassword_value.getPassword();
        char[] password2 = registration_newPassword2_value.getPassword();
        String email = registration_newEmail_value.getText();

        // kontrola, jestli jsou obě hesla stejně dlouhá (aby to v následujícím for-cyklu nevyhodilo vyjimku "Index out of bound")
        if (password.length != password2.length) {
            registration_notes_label.setText("Hesla nejsou stejná!");
            return;
        }

        // kontrola, jestli jsou hesla stejná
        String pass = "";
        for (int i = 0; i < password.length; i++) {
            if (password[i] != password2[i]) {
                registration_notes_label.setText("Hesla nejsou stejná!");
                return;
            } else {
                pass += password[i];
            }
        }

        // jestliže se nepodaří vytvořit uživatele, vypiš hlášku
        if (!csfd.CSFD.registrNewUser(newName, newSurname, newLogin, pass, email)) {
            registration_notes_label.setText("Uživatel se stejným loginem už existuje.");
        }

        switchToPanel("login_panel");
        login_login_value.setText(newLogin);
    }//GEN-LAST:event_registration_registration_buttonActionPerformed

    private void profil_comboBox_filmyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profil_comboBox_filmyActionPerformed
        currentFilm = (Film) profil_comboBox_filmy.getSelectedItem();
        if (currentFilm != null) {
            switchToPanel("film_panel");
        }
    }//GEN-LAST:event_profil_comboBox_filmyActionPerformed

    private void profil_panelComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_profil_panelComponentShown
        profil_login_label.setText(csfd.CSFD.loggedUser.getLogin());
        profil_name_value.setText(csfd.CSFD.loggedUser.getJmeno());
        profil_surname_value.setText(csfd.CSFD.loggedUser.getPrijmeni());
        profil_email_value.setText(csfd.CSFD.loggedUser.getEmail());
        List listOfMovies = csfd.CSFD.getFilmsByUser(csfd.CSFD.loggedUser.getLogin());
        profil_comboBox_filmy.setModel(new DefaultComboBoxModel(listOfMovies.toArray()));
        profil_name_value.setEnabled(false);
        profil_surname_value.setEnabled(false);
        profil_email_value.setEnabled(false);
        profil_newPassword_value.setEnabled(false);
        profil_newPassword_value2.setEnabled(false);
    }//GEN-LAST:event_profil_panelComponentShown

    private void profil_editSave_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profil_editSave_buttonActionPerformed
        if (profil_editSave_button.getText().equals("Upravit")) {   // chci upravovat udaje
            profil_name_value.setEnabled(true);
            profil_surname_value.setEnabled(true);
            profil_email_value.setEnabled(true);
            profil_newPassword_value.setEnabled(true);
            profil_newPassword_value2.setEnabled(true);

            profil_editSave_button.setText("Uložit");

        } else {    // chci upravovat udaje
            String newName = profil_name_value.getText();
            String newSurname = profil_surname_value.getText();

            char[] password = profil_newPassword_value.getPassword();
            char[] password2 = profil_newPassword_value2.getPassword();
            String email = profil_email_value.getText();

            // kontrola, jestli jsou obě hesla stejně dlouhá (aby to v následujícím for-cyklu nevyhodilo vyjimku "Index out of bound")
            if (password.length != password2.length) {
                profil_notes_pass.setText("Hesla nejsou stejná!");
                return;
            }

            // kontrola, jestli jsou hesla stejná
            String pass = "";
            for (int i = 0; i < password.length; i++) {
                if (password[i] != password2[i]) {
                    profil_notes_pass.setText("Hesla nejsou stejná!");
                    return;
                } else {
                    pass += password[i];
                }
            }

            if (csfd.CSFD.editUser(newName, newSurname, profil_login_label.getText(), pass, email)) {
            } else {
            }

            profil_name_value.setEnabled(false);
            profil_surname_value.setEnabled(false);
            profil_email_value.setEnabled(false);
            profil_newPassword_value.setEnabled(false);
            profil_newPassword_value2.setEnabled(false);
            profil_editSave_button.setText("Upravit");
        }
    }//GEN-LAST:event_profil_editSave_buttonActionPerformed

    private void login_password_valueKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_login_password_valueKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            login_login_buttonActionPerformed(null);
        }
    }//GEN-LAST:event_login_password_valueKeyPressed

    private void film_panelComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_film_panelComponentShown
        // Nejdrive vymazat to, co tam bylo
        film_name_label.setText("");
        film_origNazev_value.setText("");
        film_rok_value.setText("");
        film_delka_value.setText("");
        film_hodnoceni_value.setText("");
        film_komentar_value.setText("");
        jLabel40.setText("");
        if (csfd.CSFD.evaluated_already(currentFilm)) {
            film_ohodnoceni_comboBox.setEnabled(false);
        } else {
            film_ohodnoceni_comboBox.setEnabled(true);
        }

        film_name_label.setText(currentFilm.getNazev_filmu());
        film_origNazev_value.setText(currentFilm.getNazev_orig());
        film_rok_value.setText(String.valueOf(currentFilm.getRok()));
        film_delka_value.setText(String.valueOf(currentFilm.getDelka()));
        film_hodnoceni_value.setText(String.valueOf((currentFilm.getOhodnoceni())));

        DefaultListModel mod = new DefaultListModel();
        for (int i = 0; i < currentFilm.getKomentare().size(); i++) {
            Komentar komentar = currentFilm.getKomentare().get(i);

            mod.add(i, komentar);
            film_listOfComments.setModel(mod);
        }
    }//GEN-LAST:event_film_panelComponentShown

    private void konecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_konecActionPerformed
        csfd.CSFD.close();
        this.dispose();
    }//GEN-LAST:event_konecActionPerformed

    private void profilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profilActionPerformed
        if (csfd.CSFD.loggedUser != null) {
            switchToPanel("profil_panel");
        } else {
            switchToPanel("login_panel");
        }
    }//GEN-LAST:event_profilActionPerformed

    private void create_filmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_create_filmActionPerformed
        switchToPanel("newFilm_panel");
    }//GEN-LAST:event_create_filmActionPerformed

    private void newFilm_panelComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_newFilm_panelComponentShown
        newFilm_stat_list.setListData(csfd.CSFD.getAllStaty().toArray());
        newFilm_zanr_list.setListData(csfd.CSFD.getAllZanry().toArray());
        newFilm_herci_list.setListData(csfd.CSFD.getAllHerci().toArray());
        newFilm_reziseri_list.setListData(csfd.CSFD.getAllReziseri().toArray());
    }//GEN-LAST:event_newFilm_panelComponentShown

    private void searchFilm_search_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchFilm_search_buttonActionPerformed
        String name = searchFilm_nazevFilmu_value.getText();
        List filmy = csfd.CSFD.findFilmByName(name.trim());
        if (filmy.isEmpty()) {
            searchFilm_notes_label.setText("Nebyl nalezen žádný takový film.");
        }
        filmy_list.setModel(new DefaultComboBoxModel(filmy.toArray()));
    }//GEN-LAST:event_searchFilm_search_buttonActionPerformed

    private void newFilm_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newFilm_buttonActionPerformed
        String nazev = newFilm_nazev.getText();
        String nazevOrig = newFilm_nazevOrig.getText();
        String rok = newFilm_rok.getText();
        String delka = newFilm_delka.getText();
        List staty = newFilm_stat_list.getSelectedValuesList();
        List zanry = newFilm_zanr_list.getSelectedValuesList();
        List reziseri = newFilm_reziseri_list.getSelectedValuesList();
        List herci = newFilm_herci_list.getSelectedValuesList();

        if (csfd.CSFD.checkNewFilm(nazev, rok)) {
            newFilm_label.setText("Film už databáze obsahuje.");
        } else {
            // jestliže se nepodaří vytvořit film, vypiš hlášku
            if (csfd.CSFD.addNewFilm(nazev, nazevOrig, rok, delka, staty, zanry, reziseri, herci)) {
                newFilm_label.setText("Film byl úspěšně přidán.");
                switchToPanel("profil_panel");
            } else {
                newFilm_label.setText("Film se nepodařilo přidat.");
            }
        }
    }//GEN-LAST:event_newFilm_buttonActionPerformed

    private void create_zanrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_create_zanrActionPerformed
        switchToPanel("newZanr_panel");
    }//GEN-LAST:event_create_zanrActionPerformed

    private void create_statActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_create_statActionPerformed
        switchToPanel("newStat_panel");
    }//GEN-LAST:event_create_statActionPerformed

    private void create_herecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_create_herecActionPerformed
        switchToPanel("newHerec_panel");
    }//GEN-LAST:event_create_herecActionPerformed

    private void create_reziserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_create_reziserActionPerformed
        switchToPanel("newReziser_panel");
    }//GEN-LAST:event_create_reziserActionPerformed

    private void newZanr_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newZanr_buttonActionPerformed
        String nazev = newZanr_nazev.getText();
        String charakteristika = newZanr_charakteristika.getText();

        if (csfd.CSFD.checkNewZanr(nazev)) {
            newZanr_label.setText("Tento žánr už databáze obsahuje.");
        } else {
            if (csfd.CSFD.addNewZanr(nazev, charakteristika)) {
                newZanr_label.setText("Žánr byl úspěšně přidán.");
            } else {
                newZanr_label.setText("Žánr se nepodařilo přidat.");
            }
        }
    }//GEN-LAST:event_newZanr_buttonActionPerformed

    private void newStat_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newStat_buttonActionPerformed
        String nazev = newStat_nazev.getText();

        if (csfd.CSFD.checkNewStat(nazev)) {
            newStat_label.setText("Tento stát už databáze obsahuje.");
        } else {
            if (csfd.CSFD.addNewStat(nazev)) {
                newStat_label.setText("Stát byl úspěšně přidán.");
            } else {
                newStat_label.setText("Stát se nepodařilo přidat.");
            }
        }
    }//GEN-LAST:event_newStat_buttonActionPerformed

    private void newHerec_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newHerec_buttonActionPerformed
        String jmeno = newHerec_jmeno.getText();
        String prijmeni = newHerec_prijmeni.getText();
        String datum = newHerec_datum.getText();

        if (csfd.CSFD.checkNewHerec(jmeno, prijmeni, datum)) {
            newHerec_label.setText("Tento herec se už v databázi vyskytuje.");
        } else {
            if (csfd.CSFD.addNewHerec(jmeno, prijmeni)) {
                newHerec_label.setText("Herec byl úspěšně přidán.");
            } else {
                newHerec_label.setText("Herce se nepodařilo přidat.");
            }
        }
    }//GEN-LAST:event_newHerec_buttonActionPerformed

    private void newReziser_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newReziser_buttonActionPerformed
        String jmeno = newReziser_jmeno.getText();
        String prijmeni = newReziser_prijmeni.getText();
        String popis = newReziser_popis.getText();

        if (csfd.CSFD.checkNewReziser(jmeno, prijmeni)) {
            newReziser_label.setText("Tento režisér se už v databázi vyskytuje.");
        } else {
            if (csfd.CSFD.addNewReziser(jmeno, prijmeni, popis)) {
                newReziser_label.setText("Režisér byl úspěšně přidán.");
            } else {
                newReziser_label.setText("Režiséra se nepodařilo přidat.");
            }
        }
    }//GEN-LAST:event_newReziser_buttonActionPerformed

    private void profil_comboBox_filmyComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_profil_comboBox_filmyComponentShown
    }//GEN-LAST:event_profil_comboBox_filmyComponentShown

    private void search_filmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_search_filmActionPerformed
        switchToPanel("searchFilm_panel");

    }//GEN-LAST:event_search_filmActionPerformed

    private void addComment_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addComment_buttonActionPerformed
        String text = film_komentar_value.getText();
        Komentar kom = new Komentar();
        kom.setText(text);
        kom.setFilm(currentFilm);
        kom.setOwner(csfd.CSFD.loggedUser);
        csfd.CSFD.addNewComment(kom);
        currentFilm.getKomentare().add(kom);

        // překreslit seznam komentářů
        DefaultListModel mod = new DefaultListModel();
        for (int i = 0; i < currentFilm.getKomentare().size(); i++) {
            Komentar komentar = currentFilm.getKomentare().get(i);
            mod.add(i, komentar);
            film_listOfComments.setModel(mod);
        }
    }//GEN-LAST:event_addComment_buttonActionPerformed

    private void searchFilm_nazevFilmu_valueKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchFilm_nazevFilmu_valueKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            searchFilm_search_buttonActionPerformed(null);
        }
    }//GEN-LAST:event_searchFilm_nazevFilmu_valueKeyPressed

    private void filmy_listActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filmy_listActionPerformed
        currentFilm = (Film) filmy_list.getSelectedItem();
        filmy_list.removeAllItems();
        if (currentFilm != null) {
            switchToPanel("film_panel");
        }
    }//GEN-LAST:event_filmy_listActionPerformed

    private void searchFilm_panelComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_searchFilm_panelComponentShown
        searchFilm_nazevFilmu_value.setText("");
        filmy_list.removeAllItems();
    }//GEN-LAST:event_searchFilm_panelComponentShown

    private void film_ohodnoceni_comboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_film_ohodnoceni_comboBoxActionPerformed
        int ohodnoceni = Integer.parseInt(film_ohodnoceni_comboBox.getSelectedItem().toString());
        csfd.CSFD.evaluation(currentFilm, ohodnoceni);
        film_ohodnoceni_comboBox.setEnabled(false);
    }//GEN-LAST:event_film_ohodnoceni_comboBoxActionPerformed

    private void deleteComment_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteComment_buttonActionPerformed
        int[] indexy = film_listOfComments.getSelectedIndices();
        for (int i = 0; i < indexy.length; i++) {
            Komentar kom = currentFilm.getKomentare().get(i);
            currentFilm.getKomentare().remove(i);
            csfd.CSFD.deleteComment(kom);
        }

        DefaultListModel mod = new DefaultListModel();
        for (int i = 0; i < currentFilm.getKomentare().size(); i++) {
            Komentar komentar = currentFilm.getKomentare().get(i);
            mod.add(i, komentar);
            film_listOfComments.setModel(mod);
        }
    }//GEN-LAST:event_deleteComment_buttonActionPerformed

    /**
     * Metoda, ktera přehodí panel na ten, který má v CardLayout jméno jako je
     * predane v parametru Panel se musí zaregistrovat v kontruktoru Window() za
     * initComponents(). Jmeno je na konci souboru jako private String
     *
     * @param nameOfPanel Zaregistrovane jmeno panelu, ktery chci zobrazit.
     */
    private void switchToPanel(String cardNameOfPanel) {
        CardLayout cardLayout = (CardLayout) (cards.getLayout());
        cardLayout.show(cards, cardNameOfPanel);
    }

    private Vector listToVector(List data) {
        Vector vec = new Vector<>();
        for (int i = 0; i < data.size(); i++) {
            Film f = (Film) data.get(i);
            vec.add(f.toVector());
        }
        return vec;
    }

    private Vector<String> vectorOfColumnNames() {
        Vector<String> vec = new Vector<>();
        vec.addAll(Arrays.asList(columnNames));
        return vec;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Window.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Window.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Window.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Window.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        csfd.CSFD.init();

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Window().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addComment_button;
    private javax.swing.JButton addFilm_button;
    private javax.swing.JButton addHerec_button;
    private javax.swing.JButton addReziser_button;
    private javax.swing.JButton addStat_button;
    private javax.swing.JButton addZanr_button;
    private javax.swing.JPanel cards;
    private javax.swing.JMenuItem create_film;
    private javax.swing.JMenuItem create_herec;
    private javax.swing.JMenuItem create_reziser;
    private javax.swing.JMenuItem create_stat;
    private javax.swing.JMenuItem create_zanr;
    private javax.swing.JButton deleteComment_button;
    private javax.swing.JMenu file;
    private javax.swing.JMenu film;
    private javax.swing.JTextField film_delka_value;
    private javax.swing.JLabel film_hodnoceni_value;
    private javax.swing.JTextArea film_komentar_value;
    private javax.swing.JList film_listOfComments;
    private javax.swing.JLabel film_name_label;
    private javax.swing.JComboBox film_ohodnoceni_comboBox;
    private javax.swing.JTextField film_origNazev_value;
    private javax.swing.JPanel film_panel;
    private javax.swing.JTextField film_rok_value;
    private javax.swing.JTextField film_stat_value;
    private javax.swing.JTextField film_zanr_value;
    private javax.swing.JComboBox filmy_list;
    private javax.swing.JMenu herec;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JMenuItem konec;
    private javax.swing.JLabel label_newFilm;
    private javax.swing.JLabel label_newFilm1;
    private javax.swing.JLabel label_newHerec;
    private javax.swing.JLabel label_newReziser;
    private javax.swing.JLabel label_newStat;
    private javax.swing.JLabel label_newZanr;
    private javax.swing.JButton login_login_button;
    private javax.swing.JTextField login_login_value;
    private javax.swing.JButton login_newUser_button;
    private javax.swing.JLabel login_notes_label;
    private javax.swing.JPanel login_panel;
    private javax.swing.JPasswordField login_password_value;
    private javax.swing.JTextField newFilm_delka;
    private javax.swing.JList newFilm_herci_list;
    private javax.swing.JLabel newFilm_label;
    private javax.swing.JTextField newFilm_nazev;
    private javax.swing.JTextField newFilm_nazevOrig;
    private javax.swing.JPanel newFilm_panel;
    private javax.swing.JList newFilm_reziseri_list;
    private javax.swing.JTextField newFilm_rok;
    private javax.swing.JList newFilm_stat_list;
    private javax.swing.JList newFilm_zanr_list;
    private javax.swing.JTextField newHerec_datum;
    private javax.swing.JTextField newHerec_jmeno;
    private javax.swing.JLabel newHerec_label;
    private javax.swing.JPanel newHerec_panel;
    private javax.swing.JTextField newHerec_prijmeni;
    private javax.swing.JTextField newReziser_jmeno;
    private javax.swing.JLabel newReziser_label;
    private javax.swing.JPanel newReziser_panel;
    private javax.swing.JTextArea newReziser_popis;
    private javax.swing.JTextField newReziser_prijmeni;
    private javax.swing.JLabel newStat_label;
    private javax.swing.JTextField newStat_nazev;
    private javax.swing.JPanel newStat_panel;
    private javax.swing.JTextArea newZanr_charakteristika;
    private javax.swing.JLabel newZanr_label;
    private javax.swing.JTextField newZanr_nazev;
    private javax.swing.JPanel newZanr_panel;
    private javax.swing.JMenuItem profil;
    private javax.swing.JComboBox profil_comboBox_filmy;
    private javax.swing.JButton profil_editSave_button;
    private javax.swing.JTextField profil_email_value;
    private javax.swing.JLabel profil_login_label;
    private javax.swing.JTextField profil_name_value;
    private javax.swing.JPasswordField profil_newPassword_value;
    private javax.swing.JPasswordField profil_newPassword_value2;
    private javax.swing.JLabel profil_notes_pass;
    private javax.swing.JPanel profil_panel;
    private javax.swing.JTextField profil_surname_value;
    private javax.swing.JTextField registration_newEmail_value;
    private javax.swing.JTextField registration_newName_value;
    private javax.swing.JPasswordField registration_newPassword2_value;
    private javax.swing.JPasswordField registration_newPassword_value;
    private javax.swing.JTextField registration_newSurname_value;
    private javax.swing.JTextField registration_newlogin_value;
    private javax.swing.JLabel registration_notes_label;
    private javax.swing.JPanel registration_panel;
    private javax.swing.JButton registration_registration_button;
    private javax.swing.JMenu reziser;
    private javax.swing.JTextField searchFilm_nazevFilmu_value;
    private javax.swing.JLabel searchFilm_notes_label;
    private javax.swing.JPanel searchFilm_panel;
    private javax.swing.JButton searchFilm_search_button;
    private javax.swing.JMenuItem search_film;
    private javax.swing.JPanel search_panel;
    private javax.swing.JMenu stat;
    private javax.swing.JMenu zanr;
    // End of variables declaration//GEN-END:variables
    private Film currentFilm;
    String columnNames[] = {"Název filmu", "Originální název", "Rok natočení", "Délka(min)", "Žánr", "Země"};
}